package com.gd.luxiaoyu.upfileServlet;

import org.apache.commons.fileupload.servlet.ServletFileUpload;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@WebServlet(name = "userRegisterServlet",value = "/userRegisterServlet")
public class userRegisterServlet  extends HttpServlet {

    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.setCharacterEncoding("UTF-8");
        req.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html;charset=UTF-8");


        /*这个是用户注册的基本信息  用户在注册之后就会产生一个id
        Integer Uid = Integer.parseInt((String) req.getAttribute(""));
        String
        pictrueTableEntity.setUid(1);

        ServletContext  sc = req.getSession().getServletContext();
        XmlWebApplicationContext xmlWebApplicationContext = (XmlWebApplicationContext) WebApplicationContextUtils.findWebApplicationContext(sc);
        PictrueTableService appVerService = (PictrueTableService) xmlWebApplicationContext.getBean("PictrueTableServiceImpl");
        BaseMapper<PictrueTableEntity> baseMapper = appVerService.getBaseMapper();

        baseMapper.insert(pictrueTableEntity);*/

        boolean ismultipartContent = ServletFileUpload.isMultipartContent(req);


    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req, resp);
    }


}
